<template>
    <!-- 搜索框和下拉框 -->
  <div class="inputBox">
    <a-select class="select" v-model:value="result">
      <a-select-option value="全部类型">全部类型</a-select-option>
      <a-select-option value="阈值类">阈值类</a-select-option>
      <a-select-option value="离线类">离线类</a-select-option>
      <a-select-option value="故障类">故障类</a-select-option>
    </a-select>
    <a-input-search class="input" placeholder="搜索事件" v-model:value="search" />
  </div>
</template>

<script setup>
import { ref, watchEffect } from 'vue'
import emitter from './utils/index'

// 下拉框
const result = ref('全部类型')
watchEffect(() => {
  emitter.emit('changeSelect',result.value)
})

// 搜索框
const search=ref('')
watchEffect(() => {
  emitter.emit('changePos',search.value)
})
</script>


<style scoped>
.inputBox{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.select{
  width: 100px;

}
.input{
  width: 200px;
}
</style>